package com.hilin.entity.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hilin.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @author qhl
 * @since 2021-11-24
 */
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Data
@ApiModel("消息表")
@TableName("msg_info")
public class MsgInfoPo  extends BaseEntity<MsgInfoPo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("消息id")
    @TableId("msg_id")
    private Long msgId;
    @ApiModelProperty("所属机构ID")
    @TableField("org_id")
    private Long orgId;
    @ApiModelProperty("发起人ID")
    @TableField("from_id")
    private String fromId;
    @ApiModelProperty("发起人类型")
    @TableField("from_type")
    private String fromType;
    @ApiModelProperty("发起人名字")
    @TableField("from_name")
    private String fromName;
    @ApiModelProperty("接收人ID")
    @TableField("target_id")
    private String targetId;
    @ApiModelProperty("接收人类型")
    @TableField("target_type")
    private String targetType;
    @ApiModelProperty("接收人名字")
    @TableField("target_name")
    private String targetName;
    @ApiModelProperty("消息内容")
    private String content;
    @ApiModelProperty("消息类型")
    @TableField("content_type")
    private String contentType;
    @ApiModelProperty("额外参数;json字符串")
    private String extra;
    @ApiModelProperty("发送时间;如果为空，则是当前时间")
    @TableField("send_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date sendTime;
    @ApiModelProperty("创建时间")
    @TableField("creator_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date creatorTime;
}